unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, DBAccess, Uni, StdCtrls, UniProvider, SQLServerUniProvider,
  ODBCUniProvider, AccessUniProvider;

type
  TForm1 = class(TForm)
    UniConnection1: TUniConnection;
    Btnx_1: TButton;
    Btnx_2: TButton;
    SQLServerUniProvider1: TSQLServerUniProvider;
    AccessUniProvider1: TAccessUniProvider;
    procedure Btnx_1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
  public
  end;

var
  Form1: TForm1;

implementation

uses
  Class_Addx,Class_KzUtils;


{$R *.dfm}

procedure TForm1.Btnx_1Click(Sender: TObject);
var
  I:Integer;
  SQLA:string;
  UniQueryA:TUniQuery;
begin
  SQLA:='SELECT 1 AS NONE FROM TBL_CARD';
  UniQueryA:=TADDX.GetUniQuery(SQLA,UniConnection1);

  for I:=0 to UniQueryA.Fields.Count-1 do
  begin
    TKzUtils.WritLog(UniQueryA.Fields.Fields[I].FieldName);
  end;

  TKzUtils.WritLog('------------------------------');
  
  for I:=0 to UniQueryA.FieldDefs.Count-1 do
  begin
    TKzUtils.WritLog(UniQueryA.FieldDefs.Items[I].Name);
  end;    
  
end;

procedure TForm1.FormShow(Sender: TObject);
begin
  UniConnection1.Connected:=True;
end;

end.
